/*
 * Powered By XY
 * Since 2020
 */

package com.xy.biz.ts.manager;

import java.util.Collection;
import java.util.List;

import com.xy.biz.ts.domain.bo.ExaminationPaperBO;
import com.xy.biz.ts.domain.bo.ExaminationPaperQuestionBO;
import com.xy.biz.ts.domain.bo.ExaminationPaperRuleBO;
import com.xy.biz.ts.domain.query.ExaminationPaperQuery;
import com.xy.biz.ts.domain.req.GetExaminationPaperStatusRequest;
import com.xy.biz.ts.domain.resp.GetExaminationPaperResponse;

/**
 *
 *
 * @author wcs
 * @date 2021-3-8
 */
public interface ExaminationPaperManager {

	/**
	 * 保存
	 *
	 * @param examinationPaperBO
	 */
	int saveExaminationPaper(ExaminationPaperBO examinationPaperBO);

	/**
	 * 保存多个
	 *
	 * @param collection
	 */
	int saveAllExaminationPaper(Collection<ExaminationPaperBO> collection);

	/**
	 * 更新
	 *
	 * @param examinationPaperBO
	 */
	int updateExaminationPaper(ExaminationPaperBO examinationPaperBO);

	/**
	 * 删除
	 *
	 * @param examinationPaperId
	 */
	int deleteExaminationPaper(Long examinationPaperId);

	/**
	 * 查找一个
	 *
	 * @param examinationPaperId
	 * @return
	 */
	ExaminationPaperBO getExaminationPaper(Long examinationPaperId);

	/**
	 * 查找多个
	 *
	 * @param collection 标识集合
	 */
	List<ExaminationPaperBO> listExaminationPaperById(Collection<Long> collection);

	/**
	 * 查找多个
	 *
	 * @param query 查找条件
	 */
	List<ExaminationPaperBO> listExaminationPaper(ExaminationPaperQuery query);

	/**
	 * 统计个数
	 *
	 * @param query 查找条件
	 */
	int countExaminationPaper(ExaminationPaperQuery query);

	int saveExaminationPaperQuestion(Collection<ExaminationPaperQuestionBO> examinationPaperBO);

	int saveExaminationPaperQuestion(ExaminationPaperQuestionBO examinationPaperBO);

	int saveExaminationPaperRule(Collection<ExaminationPaperRuleBO> examinationPaperBO);

	GetExaminationPaperResponse getFixedExaminationPaper(Long examinationPaperId);

	GetExaminationPaperResponse getRandomExaminationPaper(Long examinationPaperId);

    int updateStatusExaminationPaper(GetExaminationPaperStatusRequest request);

	int deleteRuleExaminationPaper(Long examinationPaperRuleId);

	int deleteQuestionExaminationPaper(Long examinationPaperQuestionId);

	Integer getNextSequence();

	int deleteExaminationPaperMultiple(Collection<Long> collection);
}
